-- GENERATED SPELL FOR [Illidari Highlord] --


function spell0_19797(pUnit, Event) --@Curse of Flames,n/a--
pUnit:FullCastSpellOnTarget(38010,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19797', 580, 1)
end

function spell1_19797(pUnit, Event) --@Flamestrike,n/a--
pUnit:FullCastSpellOnTarget(16102,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19797', 11000, 1)
end

function Sorts_19797(pUnit, Event)
local choix_sorts_19797 = math.random(0, 1)
if choix_sorts_19797 == 0 then
pUnit:RegisterEvent('spell0_19797', 1, 1)
end
if choix_sorts_19797 == 1 then
pUnit:RegisterEvent('spell1_19797', 1, 1)
end
end

function mob19797_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19797', math.random(1500, 3000), 1)
end

function mob19797_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19797_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19797_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19797, 1, 'mob19797_Action')
RegisterUnitEvent(19797, 2, 'mob19797_Leave')
RegisterUnitEvent(19797, 3, 'mob19797_Kill')
RegisterUnitEvent(19797, 4, 'mob19797_Die')
